<style>
    .ui-grid-cell {
        height: auto !important;
    }
</style>
<div class="bg-light lter b-b wrapper-sm">
    <h1 class="m-n font-thin h4">应付审核</h1>
</div>
<div class="wrapper-sm" ng-controller="feeAuditController">
    <div class="panel panel-default">
        <div class="panel-heading font-bold">查询</div>
        <div class="panel-body">
            <label class="control-label pull-left m-t-xs w-xs">合同号</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="feeAuditCtrl_contractNumber" ng-model="queryTerms.contractNumber" placeholder="请输入合同号" name="contractNumber">
            </div>
            <label class="control-label pull-left m-t-xs w-xs">承运商</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="feeAuditCtrl_carrierName" ng-model="queryTerms.carrierName" placeholder="请输入承运商" name="carrierName">
            </div>
            <label class="control-label pull-left m-t-xs w-xs">付款方式</label>
            <div class="col-md-2 form-group">
                <select class="form-control input-sm" id="feeAuditCtrl_paymentMethod" name="paymentMethod" ng-model="queryTerms.paymentMethod" ng-options="x.value as x.text for x in paymentMethodDropDown">
                    <option value="">全部</option>
                </select>
            </div>
            <label class="control-label pull-left m-t-xs w-xs">申领人员</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="feeAuditCtrl_applicant" ng-model="queryTerms.applicant" placeholder="请输入申领人员" name="applicant">
            </div>
            <div class="line line-xs pull-in"></div>
            <label class="control-label pull-left m-t-xs w-xs">申请起始时间</label>
            <div class="col-md-2 col-xs-12 form-group">
                <div class="input-group input-group-sm date">
                    <input id="startTime" name="startTime" datetimepicker plugintype="datetime" ng-model="queryTerms.startTime" placeholder="起始时间" class="form-control" type="text" />
                    <span id="opendataTime" class="input-group-addon curpoint">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
            <label class="control-label pull-left m-t-xs w-xs">申请结束时间</label>
            <div class="col-md-2 col-xs-12 form-group">
                <div class="input-group input-group-sm date">
                    <input id="endTime" name="datetime" datetimepicker plugintype="datetime" ng-model="queryTerms.endTime" placeholder="结束时间" class="form-control" type="text" />
                    <span id="opendataTimeEnd" class="input-group-addon curpoint">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
            <label class="control-label pull-left m-t-xs w-xs">车牌号</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm" id="feeAuditCtrl_carCode" ng-model="queryTerms.carCode" placeholder="请输入车牌号" name="carCode">
            </div>
            <label class="control-label pull-left m-t-xs w-xs">费用类型</label>
            <div class="col-md-2 form-group">
                <select class="form-control input-sm" id="feeAuditCtrl_feeType" name="feeAuditCtrl_feeType" ng-model="queryTerms.feeType" ng-options="x.value as x.text for x in feeTypeDropDown">
                    <option value="">全部</option>
                </select>
            </div>
            <div class="line line-xs pull-in"></div>
            <label class="control-label pull-left m-t-xs w-xs">费用状态</label>
            <div class="col-md-2 form-group">
                <select class="form-control input-sm" ng-model="queryTerms.feeStatuslist" id="feeAuditCtrl_feeStatuslist" name="feeAuditCtrl_feeStatuslist" ng-options="x.value as x.text for x in feeStatusDropDown">
                    <option value="">全部</option>
                </select>
			</div>
			<label class="control-label pull-left m-t-xs w-xs">发货地址</label>
			<div class="col-md-2 form-group">
				<input type="text" class="form-control input-sm" id="feeAuditCtrl_origin" ng-model="queryTerms.origin" placeholder="请输入发货地址" name="origin">
			</div>
			<label class="control-label pull-left m-t-xs w-xs">送货地址</label>
			<div class="col-md-2 form-group">
				<input type="text" class="form-control input-sm" id="feeAuditCtrl_destination" ng-model="queryTerms.destination" placeholder="请输入送货地址" name="destination">
			</div>
			<label class="control-label pull-left m-t-xs w-xs"></label>
			<div class="col-md-2 col-xs-12">
				<button id="feeAuditCtrl_queryFunc" ng-click="queryFunc()" class="btn btn-sm btn-default btn-addon" ng-class="{'disabled':querying}" ng-disabled="querying">
                    <i class="fa fa-search" ng-show="!querying"></i>
                    <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                    <span ng-show="!querying">查询</span>
                    <span ng-show="querying">查询中...</span>
                </button>
            </div>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">
            应付审核列表
        </div>
        <div class="table-responsive">
            <div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-auto-resize style="height:{{heightA}}px; min-width:1000px; min-height:395px; overflow-y:hidden;">
                <div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
            </div>
        </div>
        <div class="panel-body">
            <label class="pull-left control-label">已选中费用</label>
            <div class="col-lg-7">
                <span class="ui-select-bootstrap dropdown form-control">
                    <span ng-repeat="item in selectedFeeListInfo">
                        <span style="margin-right: 3px; margin-bottom:3px;" class="ui-select-match-item btn btn-default btn-xs">
                            <span class="close ui-select-match-close" ng-click="feeSelectedDelet(item.id,item.feeCode)">&nbsp;×</span>

                <span>{{item.feeCode}}</span>
                </span>
                </span>
                </span>
            </div>
            <div class="line  pull-in"></div>
            <div class="form-group">
                <button id="feeAuditCtrl_selectAllEve" ng-click="selectAllEve()" class="pull-right-xs btn btn-sm btn-success btn-addon "><i class="fa fa-check-square-o"></i>全选</button>
                <button id="feeAuditCtrl_feeAuditEve" ng-click="feeAuditEve()" class="pull-right-xs btn btn-sm btn-info btn-addon " ng-if="feeAuditDisBtn"><i class="fa fa-pencil"></i>费用审核</button>
                <button id="feeAuditCtrl_feeAuditPass" class="pull-right-xs btn btn-sm btn-success btn-addon" ng-click="feeAuditPass()" ng-if="feeAuditDisBtn"><i class="fa fa-check"></i>审核通过</button>
                <button id="feeAuditCtrl_feeBackTransact" class="pull-right-xs btn btn-sm btn-primary btn-addon" ng-click="feeBackTransact()" ng-if="feeAuditDisBtn"><i class="fa fa-mail-reply-all"></i>退回办理</button>
                <button id="feeAuditCtrl_exportFeeList" ng-click="exportFunc()" class="pull-right-xs btn btn-sm btn-success btn-addon " ng-if="exportFeeBtn"><i class="fa fa-download"></i>导出报表</button>
                <button id="feeAuditCtrl_auditChange" ng-click="auditChange()" class="pull-right-xs btn btn-sm btn-info btn-addon"><i class="fa fa-pencil"></i>{{auditBtn}}</button>
                <label class="control-label pull-right text-danger l-h-14">
                   <span>当前状态:{{auditName}}</span>
                    <br />
                   <strong>单笔限额{{feeQuota}}，单笔运单限额{{carrierOrderQuota}}</strong>
                </label>
            </div>
        </div>
    </div>

</div>